﻿using Abp.AutoMapper;
using Magicodes.Admin.SFOrders;
using Newtonsoft.Json;

namespace Magicodes.Admin.Web.Models
{

    public class SFQiaoCreateOrderModel
    {

        public class Cargo
        {
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@name")]
            public string name { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@count")]
            public string count { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@unit")]
            public string unit { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@weight")]
            public string weight { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@amount")]
            public string amount { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@currency")]
            public string currency { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@source_area")]
            public string source_area { get; set; }
        }

        public class Order
        {
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@orderid")]
            public string orderid { get; set; }
            /// <summary>
            /// 深圳宝龙达信息技术股份有限公司
            /// </summary>
            [JsonProperty("@j_company")]
            public string j_company { get; set; }
            /// <summary>
            /// 邓丽君
            /// </summary>
            [JsonProperty("@j_contact")]
            public string j_contact { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@j_tel")]
            public string j_tel { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@j_mobile")]
            public string j_mobile { get; set; }
            /// <summary>
            /// 广东省
            /// </summary>
            [JsonProperty("@j_province")]
            public string j_province { get; set; }
            /// <summary>
            /// 深圳市
            /// </summary>
            [JsonProperty("@j_city")]
            public string j_city { get; set; }
            /// <summary>
            /// 南山区
            /// </summary>
            [JsonProperty("@j_county")]
            public string j_county { get; set; }
            /// <summary>
            /// 广东省深圳市南山区西丽镇塘朗同富裕工业城7栋
            /// </summary>
            [JsonProperty("@j_address")]
            public string j_address { get; set; }
            /// <summary>
            /// 四海
            /// </summary>
            [JsonProperty("@d_contact")]
            public string d_contact { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@d_tel")]
            public string d_tel { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@d_mobile")]
            public string d_mobile { get; set; }
            /// <summary>
            /// 广东省
            /// </summary>
            [JsonProperty("@d_province")]
            public string d_province { get; set; }
            /// <summary>
            /// 深圳市
            /// </summary>
            [JsonProperty("@d_city")]
            public string d_city { get; set; }
            /// <summary>
            /// 南山区
            /// </summary>
            [JsonProperty("@d_county")]
            public string d_county { get; set; }
            /// <summary>
            /// 科技园软件产业基地
            /// </summary>
            [JsonProperty("@d_address")]
            public string d_address { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@express_type")]
            public string express_type { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@pay_method")]
            public string pay_method { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@custid")]
            public string custid { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@parcel_quantity")]
            public string parcel_quantity { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@is_docall")]
            public string is_docall { get; set; }
            /// <summary>
            /// 宝龙达
            /// </summary>
            [JsonProperty("@order_source")]
            public string order_source { get; set; }
            /// <summary>
            /// 电子产品 笔记本+显卡
            /// </summary>
            [JsonProperty("@remark")]
            public string remark { get; set; }
            /// <summary>
            /// 
            /// </summary> 
            public Cargo Cargo { get; set; }
        }

        public class Body
        {
            /// <summary>
            /// 
            /// </summary>
            public Order Order { get; set; }
        }

        public class Request
        {
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@service")]
            public string service { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@lang")]
            public string lang { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string Head { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public Body Body { get; set; }
        }

        public class Root
        {
            /// <summary>
            /// 
            /// </summary>
            public Request Request { get; set; }
        }


        public enum pay_method
        {

            寄方付, 收方付, 第三方付
        }
        public enum express_type
        {
            顺丰标快,
            顺丰特惠,
            电商特惠,
            顺丰次晨 = 5,
            即日件,
            电商速配,

        }
    }

    /// <summary>
    /// 订单状态推送
    /// </summary>
    public class SFQiaoStatusBackModel
    {
        [AutoMapTo(typeof(SFQiaoRouteStatusBack ))]
        public class SFQiaoStatusBackModelRequest
        {
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@@service")]
            public string service { get; set; }
            /// <summary>
            /// 
            /// </summary>
            [JsonProperty("@@lang")]
            public string lang { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string orderNo { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string waybillNo { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string orderStateCode { get; set; }
            /// <summary>
            /// 调度成功,收派员信息
            /// </summary>
            public string orderStateDesc { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string empCode { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string empPhone { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string netCode { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string lastTime { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string bookTime { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string carrierCode { get; set; }
        }

        public SFQiaoStatusBackModelRequest Request { get; set; }


    }

    #region 下单返回
    /// <summary>
    /// 下单返回
    /// </summary>
    [AutoMapTo(typeof(SFOrderResult))]
    public class Rls_detail
    { 
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@waybillNo")]
        public string waybillNo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@sourceCityCode")]
        public string sourceCityCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@destCityCode")]
        public string destCityCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@destDeptCode")]
        public string destDeptCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@destDeptCodeMapping")]
        public string destDeptCodeMapping { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@destTeamCode")]
        public string destTeamCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@destTransferCode")]
        public string destTransferCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@destRouteLabel")]
        public string destRouteLabel { get; set; }
        /// <summary>
        /// 顺丰标快
        /// </summary>
        [JsonProperty("@proName")]
        public string proName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@cargoTypeCode")]
        public string cargoTypeCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@limitTypeCode")]
        public string limitTypeCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@expressTypeCode")]
        public string expressTypeCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@codingMapping")]
        public string codingMapping { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@xbFlag")]
        public string xbFlag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@printFlag")]
        public string printFlag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@twoDimensionCode")]
        public string twoDimensionCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@proCode")]
        public string proCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@printIcon")]
        public string printIcon { get; set; }

        [JsonProperty("@sourceDeptCode")]
        public string sourceDeptCode { get; set; }

        [JsonProperty("@sourceTeamCode")]
        public string sourceTeamCode { get; set; }

        [JsonProperty("@sourceTransferCode")]
        public string sourceTransferCode { get; set; }

        [JsonProperty("@destRouteLabe")]
        public string destRouteLabe { get; set; }
    }

    public class Rls_info
    {
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@rls_errormsg")]
        public string rls_errormsg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@invoke_result")]
        public string invoke_result { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@rls_code")]
        public string rls_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public Rls_detail rls_detail { get; set; }
    }

    public class OrderResponse
    {
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@filter_result")]
        public string filter_result { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@destcode")]
        public string destcode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@mailno")]
        public string mailno { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@origincode")]
        public string origincode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@orderid")]
        public long orderid { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public Rls_info rls_info { get; set; }
    }

    public class Body
    {
        /// <summary>
        /// 
        /// </summary>
        public OrderResponse OrderResponse { get; set; }
    }

    public class SFQiaoOrderCreateResulResponse
    {
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("@service")]
        public string service { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string Head { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public Body Body { get; set; }
    }

    public class SFQiaoOrderCreateResultRoot
    {
        /// <summary>
        /// 
        /// </summary>
        public SFQiaoOrderCreateResulResponse Response { get; set; }
    }
    #endregion

}
